package aip.core.model.consultation;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 咨询单
 * <p>
 * 负责人/principal: Daniel<br/>
 * 修改记录/revision:<br/>
 * 日期:<br/>
 * 修改人:<br/>
 * 修改说明:
 * @author RUN
 * @version $Id: codetemplates.xml 2007 2009-05-08 08:36:14Z shiw $
 */
@Entity
@Table(name = "AIP_CONSLT")
public class Consultation implements Serializable
{
    private static final long serialVersionUID = 676921694436669833L;

    public static final String STATE_TOASIGN = "TOASSIGNED";
    public static final String STATE_ASIGNED = "ASSIGNED";
    public static final String STATE_REPLIED = "REPLIED";

    public static Map<String, String> stateMap = new LinkedHashMap<String, String>();
    static
    {
        stateMap.put(STATE_TOASIGN, "待分配");
        stateMap.put(STATE_ASIGNED, "待回复");
        stateMap.put(STATE_REPLIED, "已回复");
    }

    /** 咨询单ID */
    private int id;
    /** 咨询单状态 */
    private String state;
    /** 咨询主题 */
    private String title;
    /** 所属领域 */
    private int catalog;

    /** 咨询企业 */
    private String enterprise;
    /** 提交时间 */
    private Date submitTime;
    /** 咨询内容 */
    private String question;

    /** 客服（派单人） */
    private String customService;
    /** 专家 */
    private String expert;
    /** 接单时间 */
    private Date receiveTime;
    /** 回复时间 */
    private Date replyTime;
    /** 专家答复 */
    private String reply;

    /** 企业反馈 */
    private String feedback;

    /**
     * @return the id
     */
    @Id
    @Column(name = "ID_")
    public int getId()
    {
        return id;
    }

    /**
     * @param id
     *        the id to set
     */
    public void setId(int id)
    {
        this.id = id;
    }

    /**
     * @return the state
     */
    @Column(name = "STATE_")
    public String getState()
    {
        return state;
    }

    /**
     * @param state
     *        the state to set
     */
    public void setState(String state)
    {
        this.state = state;
    }

    /**
     * @return the title
     */
    @Column(name = "TITLE_")
    public String getTitle()
    {
        return title;
    }

    /**
     * @param title
     *        the title to set
     */
    public void setTitle(String title)
    {
        this.title = title;
    }

    /**
     * @return the catalog
     */
    @Column(name = "CATALOG_")
    public int getCatalog()
    {
        return catalog;
    }

    /**
     * @param catalog
     *        the catalog to set
     */
    public void setCatalog(int catalog)
    {
        this.catalog = catalog;
    }

    /**
     * @return the enterprise
     */
    @Column(name = "ENTP_")
    public String getEnterprise()
    {
        return enterprise;
    }

    /**
     * @param enterprise
     *        the enterprise to set
     */
    public void setEnterprise(String enterprise)
    {
        this.enterprise = enterprise;
    }

    /**
     * @return the submitTime
     */
    @Column(name = "SUBMIT_TIME_")
    public Date getSubmitTime()
    {
        return submitTime;
    }

    /**
     * @param submitTime
     *        the submitTime to set
     */
    public void setSubmitTime(Date submitTime)
    {
        this.submitTime = submitTime;
    }

    /**
     * @return the question
     */
    @Column(name = "QUSTN_")
    public String getQuestion()
    {
        return question;
    }

    /**
     * @param question
     *        the question to set
     */
    public void setQuestion(String question)
    {
        this.question = question;
    }

    /**
     * @return the customService
     */
    @Column(name = "CUST_SERV_")
    public String getCustomService()
    {
        return customService;
    }

    /**
     * @param customService
     *        the customService to set
     */
    public void setCustomService(String customService)
    {
        this.customService = customService;
    }

    /**
     * @return the expert
     */
    @Column(name = "EXPERT_")
    public String getExpert()
    {
        return expert;
    }

    /**
     * @param expert
     *        the expert to set
     */
    public void setExpert(String expert)
    {
        this.expert = expert;
    }

    /**
     * @return the receiveTime
     */
    @Column(name = "RECV_TIME_")
    public Date getReceiveTime()
    {
        return receiveTime;
    }

    /**
     * @param receiveTime
     *        the receiveTime to set
     */
    public void setReceiveTime(Date receiveTime)
    {
        this.receiveTime = receiveTime;
    }

    /**
     * @return the replyTime
     */
    @Column(name = "RE_TIME_")
    public Date getReplyTime()
    {
        return replyTime;
    }

    /**
     * @param replyTime
     *        the replyTime to set
     */
    public void setReplyTime(Date replyTime)
    {
        this.replyTime = replyTime;
    }

    /**
     * @return the reply
     */
    @Column(name = "REPLY_")
    public String getReply()
    {
        return reply;
    }

    /**
     * @param reply
     *        the reply to set
     */
    public void setReply(String reply)
    {
        this.reply = reply;
    }

    /**
     * @return the feedback
     */
    @Column(name = "FEEDBACK_")
    public String getFeedback()
    {
        return feedback;
    }

    /**
     * @param feedback
     *        the feedback to set
     */
    public void setFeedback(String feedback)
    {
        this.feedback = feedback;
    }
}
